package com.data.monitoring.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.data.monitoring.model.entity.FolderStatus;
import com.data.monitoring.mapper.FolderStatusMapper;
import com.data.monitoring.service.FolderStatusService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 文件夹状态记录 服务实现类
 * </p>
 *
 * @author HanYiMing
 * @since 2025-05-28
 */
@Service
public class FolderStatusServiceImp extends ServiceImpl<FolderStatusMapper, FolderStatus> implements FolderStatusService {

    @Resource
    private FolderStatusMapper folderStatusMapper;

    @Override
    public List<FolderStatus> findLatestStatus() {
        return folderStatusMapper.findLatestStatus();
    }

    @Override
    public Page<FolderStatus> findByFolderId(Long folderId, Pageable pageable) {
        return folderStatusMapper.findByFolderId(folderId,pageable);
    }
}
